<?php
/**
 * 个人积分明细逻辑处理模块
 * User：LLW
 * Date：2020-03-13
 * Time：8：36
 */

namespace app\caidongweb\model;

class MoneyLogModel extends BaseModel
{
    protected $table = 'cd_money_log';

    public function getList()
    {
        $where = [];
        $sta = strtotime(input('start'));
        $end = strtotime(input('end'));
        if($sta && $end){
            $where['ml_time'] = array('between',"$sta,$end");
        }
        input('key') ? $where[input('city')] = input('key') : false;
        $list = $this->where($where)->order('ml_time desc')->paginate(20,false,['query'=>request()->param()]);
        return $list;
    }
}